<template>

<textarea :value="textarea_value" @input="update_textarea" placeholder="edit me" />
<button @click="submit">提交</button>

</template>

<script setup>

const props = defineProps({
    textarea_value: String
})

const emit = defineEmits(['update:textarea_value'])

const update_textarea = (event) => {
    emit('update:textarea_value', event.target.value)
}

function submit(){
    let formData = new FormData()
    formData.append('username', this.username)
    fetch(this.$serverurl + 'get_token', { method: 'POST', body: formData})
        .then((response) => response.json())
        .then((response_result) => {
        
            })
}

</script>